<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>会员管理</title>
	</head>

	<body>
	<s:debug></s:debug>
	<s:if test='#session.user != "" && #session.user != null'>
			你好！<s:property value="#session.user"/>
	</s:if>
		<table align="center" border="1" style="width:80%;">
			<tr>
				<th colspan="7" align="center">注册会员</th>
			</tr>
			<tr>
				<td>用户名</td>
				<td>年龄</td>
				<td>生日</td>
				<td>操作</td>
			</tr>	
			<s:iterator value="users">
				<tr>
					<td>
						<s:property value="userName"/>
					</td>
					<td>
						<s:property value="age"/>
					</td>
					<td>
						<s:property value="birthday"/>
					</td>					
					<td>
						<a href="backend/member/showMember.action?userDto.id=${id}">修改信息</a>
						<a href="backend/member/removeMember.action?userDto.id=${id}">删除</a>
					</td>
				</tr>
			</s:iterator>
			<s:property value="tips"/>
			<span style="color:red"><s:property value="tip"/></span>
		</table>
		<div style="text-align:center">
			<s:url id="first" action="showMembers" namespace="/backend/member">
				<s:param name="pageModel.pageNo" value="1"></s:param>
			</s:url> <s:url id="previous" action="showMembers" namespace="/backend/member">
				<s:param name="pageModel.pageNo" value="pageModel.pageNo-1"></s:param>
			</s:url> <s:url id="last" action="showMembers" namespace="/backend/member">
				<s:param name="pageModel.pageNo" value="pageModel.bottomPageNo"></s:param>
			</s:url> <s:url id="next" action="showMembers" namespace="/backend/member">
				<s:param name="pageModel.pageNo" value="pageModel.pageNo+1"></s:param>
			</s:url> <s:include value="/common/page.jsp"></s:include>
		</div>
	</body>
</html>
